package lanqiao.a2020_b组第二次省赛;

import java.util.Arrays;
import java.util.Scanner;

public class B {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        float sum=0;
        int []arr=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=scanner.nextInt();
            sum+=arr[i];
        }
        Arrays.sort(arr);

        System.out.println(arr[n-1]);
        System.out.println(arr[0]);
        System.out.println(String.format("%.2f", sum/n));
    }

}
